try {
synchronized (this) {
while (myTotalSize > SIZE_THRESHOLD) {
if (indicator != null) {
indicator.checkCanceled();
}
wait(300L);
}
try {
synchronized (this) {
while (myTotalSize > SIZE_THRESHOLD) {
indicator.checkCanceled();
wait(300L);
}
myTotalSize += contentLength;